﻿
#include <iostream>
#include<SDL.h>
#include "main.h"
#include "jdi_mip_display.h"
#include "dino_draw.h"
#include "dino_game.h"
#include "button_bsp.h"

int main(int argc, char* argv[])
{

    bool quit = false;
    SDL_Event event;
    displayInit();
    systickInit();

    dinoGameInit();

    for (; !quit;) {

        dinoGameProcess();
        SDL_WaitEventTimeout(&event,10);

        switch (event.type) {
        case SDL_KEYDOWN:
            getKeyPressDown();
            break;
        case SDL_KEYUP:
            getKeyPressUp();
            break;
        case SDL_QUIT: {
            quit = true;
            break;
        }
        }
    }

    displayDeinit();

    return 0;
}
